<template>
	<view class="content">
		<view class="find">发现</view>
		<view class="shop-box">
			<view class="shop-item" @click="goShop">
				<image src="../../static/need/shop.png" mode="aspectFill"></image>
				<view class="shop-text">商城</view>
			</view>
			<view class="shop-item" @click="search">
				<image src="../../static/need/search.png" mode="aspectFill"></image>
				<view class="shop-text">栏目搜索</view>
			</view>
			<view class="shop-item" @click="yq">
				<image src="../../static/need/about.png" mode="aspectFill"></image>
				<view class="shop-text">邀请好友</view>
			</view>
			<view class="shop-item" @click="sc">
				<image src="../../static/need/collect.png" mode="aspectFill"></image>
				<view class="shop-text">我的收藏</view>
			</view>
			<view class="shop-item" @click="like">
				<image src="../../static/need/like.png" mode="aspectFill"></image>
				<view class="shop-text">我的喜欢</view>
			</view>
			<view class="shop-item" @click="xy">
				<image src="../../static/need/agreement.png" mode="aspectFill"></image>
				<view class="shop-text">用户协议</view>
			</view>
			<view class="shop-item" @click="set">
				<image src="../../static/need/set.png" mode="aspectFill"></image>
				<view class="shop-text">账号设置</view>
			</view>
			<view class="shop-item" @click="goUrl">
				<image src="../../static/need/about.png" mode="aspectFill"></image>
				<view class="shop-text">关于系统</view>
			</view>
		</view>
	</view>
</template>

<script>
	// getshop
		import api from '@/api/index.js'
	export default {

		data() {
			return {
				show: false,

			}
		},
		mounted() {
			this.getDate();
		},
		methods: {
			//获取数据
			getDate() {
				api.getshop({
				    type_id:'',
					page:'',
				}).then((res) => {
					console.log(res.data);
					if (res.data.code == 0) {
					
					} else {
						
					}
				})
			},
			// 关于系统
			goUrl() {
				window.location.href = "https://songshu.youyacao.com/"
			},
			goShop() {
				uni.navigateTo({
					url: '/pages/shop/index',
				})
			},
			//邀请好友
			yq() {
				uni.navigateTo({
					url: '/pages/index/user/inviterecord',
				})

			},

			search() {
				uni.navigateTo({
					url: '/pages/index/user/category-search/category-search',
				})

			},
			// 收藏
			sc() {
				uni.navigateTo({
					url: '/pages/index/user/collection/collection',
				})
			},
			// 我的喜欢
			like() {
				uni.navigateTo({
					url: '/pages/index/user/collection/collection',
				})
			},
			// 协议
			xy() {
				uni.navigateTo({
					url: '/pages/webview?url=' + encodeURIComponent(
						'https://songshu.youyacao.com/detail/220.html'),
					success: res => {},
					fail: () => {},
					complete: () => {}
				});
			},
			//设置
			set() {
				uni.navigateTo({
					url: '/pages/setting/account',
				})

			},
			aboutSysTem() {}
			// /pages/index/user/category-search/category-search

		}
	}
</script>

<style>
	.content {
		padding-top: 100rpx;
	}

	.shop-box {
		display: flex;
		flex-wrap: wrap;
		/* margin-top: 20rpx; */
	}

	.shop-item {
		width: 24%;
		padding-top: 20rpx;
		text-align: center;
	}

	.shop-item image {
		width: 100rpx;
		height: 100rpx;
	}

	.shop-item:not(:nth-child(4n)) {
		margin-right: calc(4%/3);
	}

	.find {
		padding-top: 20rpx;
		padding-bottom: 20rpx;
		padding-left: 60rpx;
		padding-right: 30rpx;
		font-size: 35rpx;
		font-weight: bold;
	}
</style>
